package com.spt.springbootzhsx.dao;

import com.spt.springbootzhsx.entity.Movie;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.ArrayList;

@Mapper
public interface MovieDao {
    @Select("select * from movie where mname=#{mname}")
    Movie getMovieByMname(String mname);

    @Select("select count(mid) from movie where mstate=#{mstate}")
    Integer getMovieCountByMstate(String mstate);

    @Select("select count(mid) from movie where mtype like concat('%',#{mtype},'%')")
    Integer getMovieCountByMtype(String mtype);
}
